<?php
/**
 * Class Order
 * Desc  单商城订单管理
 * Create on 2022/10/24 10:59
 * Create by wangyafang
 */

namespace app\admin\controller\wdsxh\single;


class Order extends \app\admin\controller\wdsxh\mall\Order
{
    public function _initialize()
    {
        parent::_initialize();
    }

    /**
 * 查看
 */
    public function index()
    {
        //设置过滤方法
        $this->request->filter(['strip_tags', 'trim']);
        if ($this->request->isAjax()) {
            //如果发送的来源是Selectpage，则转发到Selectpage
            if ($this->request->request('keyField')) {
                return $this->selectpage();
            }
            list($where, $sort, $order, $offset, $limit) = $this->buildparams();

            $list = $this->model
                ->where($where)
                ->with(['goods'])
                ->where('source','1')
                ->where('refund_status','0')
                ->order($sort, $order)
                ->paginate($limit);
            $result = array("total" => $list->total(), "rows" => $list->items());
            return json($result);
        }
        return $this->view->fetch();
    }
}



 